package com.example.spring_demo.homework;

import com.example.spring_demo.homework.HelloWorld;
import com.example.spring_demo.homework.HelloWorldConfig;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class annotation_base_javacode {


    public static void main(String[] args) {
        ApplicationContext ctx = new AnnotationConfigApplicationContext(HelloWorldConfig.class);
// now both beans J and B will be available...
        HelloWorld a = ctx.getBean(HelloWorld.class);
        HelloWorldConfig b = ctx.getBean(HelloWorldConfig.class);
    }
}
